<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/OnceCheckYield/onceCheckYield" method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="onceCheckYield" />
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel" />
          %{--  <label >工步名称：</label>&nbsp;
        <g:select name="stepName" from="${onceCheckYieldStepList}" data-toggle="selectpicker" data-live-search="true" optionKey="step_name" optionValue="step_name" value="${stepName}" noSelection="['':'ALL']" />&nbsp;--}%
            <label >客户图号：</label>&nbsp;
        <g:select name="group4" from="${onceCheckYieldUserList}" data-toggle="selectpicker" data-live-search="true" optionKey="group4" optionValue="group4" value="${group4}" noSelection="['':'ALL']" />&nbsp;
            <label >工序名称：</label>&nbsp;
        <g:select name="step" from="${onceCheckYieldStepList}" data-toggle="selectpicker" data-live-search="true" optionKey="step" optionValue="step" value="${step}" noSelection="['':'ALL']" />&nbsp;
            <label >产品种类：</label>&nbsp;
        <g:select name="category" from="${onceCheckYieldCateList}" data-toggle="selectpicker" data-live-search="true" optionKey="category" optionValue="category" value="${category}" noSelection="['':'ALL']" />&nbsp;
            <label >内部图号：</label>&nbsp;
        <g:select name="group3" from="${onceCheckYieldPicNumList}" data-toggle="selectpicker" data-live-search="true" optionKey="group3" optionValue="group3" value="${group3}" noSelection="['':'ALL']" />&nbsp;<br/>
            <label >检验日期：</label>&nbsp;
            <input type="text" name="startTime" value="${startTime}"  data-toggle="datepicker" placeholder="FROM">
            <input type="text" name="endTime" value="${endTime}"  data-toggle="datepicker" placeholder="TO">&nbsp;&nbsp;

            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <button type="button" class="btn-blue" onclick="javascript:bjuiExportExl('#pagerForm','${request.getContextPath()}/StageWip/exportExcel')" data-icon="file-excel-o" title="导出Excel">导出</button>&nbsp;
        </div>
    </form>
</div>

<div class="panel-body">
    <div style="mini-width:400px;height:450px;" id="cellGlassOutputDiv"></div>
</div>

<div class="bjui-pageContent">
    <div>

        <table  data-toggle="tablefixed" data-width="100%" data-nowrap="true">
            <thead>
            <tr id="t1">
                <g:each in="${tableHeadList}" status="j" var="headInstance">
                    <g:if test="${headInstance!='RN'}">
                        <th  width="125"><g:message code="${headInstance}" default="${headInstance}"/></th>
                    </g:if>
                </g:each>
            </tr>
            </thead>
            <tbody>
            <g:if test="${onceCheckYield.size()>0}">
                <g:each in="${onceCheckYield}" status="i" var="dataInstance">
                    <tr>
                        <g:each in="${tableHeadList}" status="j" var="headInstance">
                            <g:if test="${headInstance!='RN'}">
                                <td>${dataInstance["${headInstance}"]}</td>
                            </g:if>
                        </g:each>
                    </tr>
                </g:each>
            </g:if>
            <g:else>
                <g:render template="../template/emptyPanel" />
            </g:else>
            </tbody>
        </table>
        </div>

        <table>
            <div id="onceCheckYield1" style="width:100%;height:50%;" ></div>
            <script  src="${request.getContextPath()}/js/echarts/echarts.js"></script>
            <script  src="${request.getContextPath()}/js/echarts/echarts-tool.js"></script>
            <script type="text/javascript">
                // 基于准备好的dom，初始化echarts实例
                var contextPath = "${request.getContextPath()}";
                eChartsTool.init(contextPath);
                var data=[];
                <g:each in="${onceCheckYieldImg}" status="i" var="tableInstance">
                data.push('${tableInstance.WEEK_IN_YEAR}');
                </g:each>

                // 指定图表的配置项和数据
                var option = {
                    /*backgroundColor: 'rgba(0,0,0,0)', // 工具箱背景颜色*/
                    // 图表标题
                    title: {

                    },

                    tooltip : {
                        trigger: ''
                    },

                    legend: {
                        data:['一次合格率']

                    },
                    "xAxis": [
                        {
                            "type": "category",
                            "axisLabel":{
                                interval:0,
                                rotate:0,
                                margin:5
                            },
                            "data": data
                        }
                    ],
                    yAxis : [
                        {
                            type : 'value',
                            name:'一次合格率',
                            axisLabel : {
                                formatter: '{value}'
                            },
                            show:true
                        }
                    ],
                    series : [
                        {
                            name: '一次合格率',
                            type: 'line',
                            data:${onceCheckYieldImg.WEEK_AVERAGE}
                        }]
                };
                // 使用刚指定的配置项和数据显示图表。
                eChartsTool.setOption("roma", document.getElementById('onceCheckYield1'), option);
            </script>
        </table>
</div>
<g:render template="../template/51pagination" />